<script setup>
import { onMounted, onUnmounted } from "vue"
import _ from "lodash"

onMounted(() => {
	onResize()
	const Debounce = _.debounce(onResize, 100)
	window.onresize = () => {
		Debounce()
	}
})
// 监听窗口大小变化
const onResize = () => {
	const appstyle = document.querySelector("#app").style
	appstyle.height =
		screen.availHeight - (window.outerHeight - window.innerHeight) + "px"
}

onUnmounted(()=>{
	localStorage.clear()
})
</script>

<template>
	<router-view></router-view>
</template>

<style lang="scss">
/* 改变滚动条样式 */
::-webkit-scrollbar {
	width: 4px;
	height: 4px;
}

::-webkit-scrollbar-track {
	background-color: $scroll-bar-bg-color;
	border-radius: 10px;
}

::-webkit-scrollbar-thumb {
	background-color: $scroll-bar-thumb-color;
	border-radius: 10px;
}
</style>
